package seismosurfer.data;

import java.io.Serializable;

import seismosurfer.util.Notification;

/**
 * Acts as a layer supertype, as most Data Transfer Objects are serializable
 * and need a way to notify the user interface for any errors.<br/> 
 * This class and its subclasses need to be serializable so they can be
 * used to carry data among different processes.<br/>  
 * In addition, this class encapsulates a <a href="http://martinfowler.com/eaaDev/Notification.html">notification</a> object 
 * in order for the user interface objects to use it, to notify the user for
 * any errors.
 * 
 * @see seismosurfer.util.Notification
 *
 */
public class DataTransferObject implements Serializable {
    
    private static final long serialVersionUID = 1879116772131370535L;

    private Notification notification = new Notification();
    
    /**
     * Default constructor.
     *
     */
    public DataTransferObject() {
    }
    
    /**
     * 
     * @return the notification object which carries error messages
     */
    public Notification getNotification() {
        return notification;
    }
    
    /**
     * 
     * @param notification the notification object which carries error messages
     */

    public void setNotification(Notification notification) {
        this.notification = notification;
    }

}
